<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sj" uri="/struts-jquery-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd" >
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<link rel="stylesheet" type="text/css" href="estilo/style.css" />
	 <script language="JavaScript" type="text/javascript">	
		  function mostrarVentana(prospecto){ 
		    	var con="\?";
				var idx=con+"prospecto.codigo="+prospecto;
				var lnk="<s:url value='mostrar_prospecto_v.action"+idx+"' />";
				
			    window.open(lnk,'','width=900,height=500,left=0,top=0,resizable=yes,menubar=no,location=no,status=yes,scrollbars=yes');
		   }
		  
		  function showTT(el) {
			  	var ttext=el.title;
			  	var tt=document.createElement('SPAN');
			  	var tnode=document.createTextNode(ttext);
			  	tt.appendChild(tnode);
			  	el.parentNode.insertBefore(tt,el.nextSibling);
			  	tt.className="tt";
			  	el.title="";
			  }
			  function hideTT(el) {
			  	var ttext=el.nextSibling.childNodes[0].nodeValue;
			  	el.parentNode.removeChild(el.nextSibling);
			  	el.title=ttext;
			  }
			  function tooltip() {
				  var imgs=document.getElementsByTagName('a');
				  for (i=0; i<imgs.length; i++) {
				  		imgs[i].onmouseover=function() {showTT(this); }
				  		imgs[i].onmouseout=function() {hideTT(this); }
				  	}
			  }  
    </script>
</head>
<body>
<div id='resultado_gd_aprxss' >
 <center><img id="indicatorc2" src="img/pg1.gif" alt="Cargando..." style="display: none" /></center>   
<table width="100%">

<s:set name="ver_vendedor" ><s:property value="ver_vendedor" /></s:set>
<s:set name="ver_fuente" ><s:property value="ver_fuente" /></s:set>
<s:set name="ver_accion" ><s:property value="ver_accion" /></s:set>
<tr Height='10px' >
			<td width='25%' class='tabla_th1' >Prospecto</td>
			<td width='15%' class='tabla_th1' >Ciudad</td>
		    <td width='20%' class='tabla_th1' >Progreso</td>
		    <td width='5%' class='tabla_th1' >Asignado</td>
		    <td width='10%' class='tabla_th1' >Ingreso</td>
		    <td width='10%' class='tabla_th1' >Solicita</td>
		    <td width='7%' class='tabla_th1' >Presupuesto</td>
		    <s:if test="%{#ver_vendedor=='SI'}">
		       <td width='10%' class='tabla_th1' >Vendedor</td>
		    </s:if>   
		   
		    <s:if test="%{#ver_accion=='SI'}">
		        <td width='15%' class='tabla_th1' >Accion</td>
		    </s:if> 
		    <s:else>
		        <td width='15%' class='tabla_th1' >Observaciones</td>
		    </s:else>	 
</tr>
 <s:iterator var="outer2" status="i_status" value="rpt_asig_prospecto" >
        <s:set name="n_cod"><s:property value="#outer2.codigo" /></s:set>
        <s:set name="valx" ><s:property value="#outer2.statusa" /></s:set>
        <s:set name="n_des"><s:property value="#outer2.nombres" /></s:set>
	    <tr Height='10px'  >
		   <td width='25%' class='tit_td_pq' >
			   <s:property value="#outer2.nombres" />  
		   </td>
		   <td width='15%' class='tit_td_pq' >
		       <s:property value="#outer2.ciudad" />(<s:property value="#outer2.zona" />)
		   </td>
		   
		   <td width='20%'  class='tit_td_pq' >
			    <a href="#" class='tool_tip' title='<s:property value="#outer2.leyenda" />' id='url_hist'  onclick="javascript:mostrarVentana('<s:property value="#outer2.codigo" />')"  >
				  	<s:property value="#outer2.status" />
				</a>		
		   </td>
		   <td width='5%' class='tit_td_pq' >
		      <s:property value="#outer2.fecha" />
		   </td>
			<td width='10%' class='tit_td_pq' >
			      <s:property value="#outer2.tipo_asig" />
			</td>
		   <td width='10%' class='tit_td_pq' >
		      <s:property value="#outer2.solicita" /> 
		   </td>
		   <td width='7%' class='tit_td_pq' >
		      <s:property value="#outer2.presupuesto" /> 
		   </td>
		   <s:if test="%{#ver_vendedor=='SI'}">
			    <td width='10%' class='tit_td_pq' >
			        <s:property value="#outer2.vendedor" />
			    </td>
		   </s:if> 

		   <s:if test="%{#valx=='USR'}">
			    <td width='15%' class='tit_td_pq' >
				   <sj:div id='resultado_stx_ssx%{n_cod}' >  
				        <table>
				           <tr>
						      <td>					         
						          <td >
								        <sj:dialog id="mdventana_%{n_cod}" autoOpen="false" modal="true" hideEffect="explode" 
										    	title="Rechazar prospecto..." openTopics="openRemoteDialog" width="700"
										 />
						   				<s:url id="url__1" action="rechazar_prospecto_frm.action"  escapeAmp ="false"  >
						   					<s:param name="cod_prospecto" value="%{n_cod}"  />
						   					<s:param name="des_prospecto" value="%{n_des}"  />
										</s:url>
								       <table>
										   <tr>
											  <td>
											  	<sj:a openDialog="mdventana_%{n_cod}" href="%{url__1}" button="true"   >Rechazar</sj:a>
						    				  </td> 
											  <td></td>
										   </tr>  
									   </table> 
						          </td> 
						          <td>
							          <sj:dialog id="mdventana2_%{n_cod}" autoOpen="false" modal="true" hideEffect="explode" 
										    	title="Pausar prospecto..." openTopics="openRemoteDialog" width="700"
										 />
						   				<s:url id="url__2" action="pausar_prospecto_frm.action"  escapeAmp ="false"  >
						   					<s:param name="cod_prospecto" value="%{n_cod}"  />
						   					<s:param name="des_prospecto" value="%{n_des}"  />
										</s:url>
								       <table>
										   <tr>
											  <td>
											  <sj:a openDialog="mdventana2_%{n_cod}" href="%{url__2}" button="true"   >Pausar</sj:a>
						    				  </td> 
											  <td></td>
										   </tr>  
									   </table> 
						         </td>
						   </tr>  
					   </table> 
				   </sj:div>    
			    </td>
		    </s:if>
		    <s:else>
		      	<td width='15%' class='tit_td_pq' >
				   <sj:div id='resultado_stx_5556%{n_cod}' >  
				        <table>
				           <tr>
						      <td>					         
						          <td >
								        <sj:dialog id="mdventana3_%{n_cod}" autoOpen="false" modal="true" hideEffect="explode" 
										    	title="Observaciones prospecto..." openTopics="openRemoteDialog" width="700"
										 />
						   				    <s:url id="url__3" action="obs_prospecto_frm.action"  escapeAmp ="false"  >
						   					<s:param name="cod_prospecto" value="%{n_cod}"  />
						   					<s:param name="des_prospecto" value="%{n_des}"  />
										</s:url>
								       <table>
										   <tr>
											  <td>
											     <span class='url_hist1' >
											  	     <sj:a openDialog="mdventana3_%{n_cod}" href="%{url__3}" button="false"   ><s:property value="#outer2.obs_esp" /></sj:a>
											  	  </span>	  
						    				  </td> 
											  <td></td>
										   </tr>  
									   </table> 
						          </td> 
						   </tr>  
					   </table> 
				   </sj:div>    
			    </td>
		    </s:else>	 
	     </tr>
</s:iterator>
 </table>
 <table  width='100%' >
     <tr Height='10px' >
	   <td width='100%' colspan='5' class='tabla_th1' >.</td>
     </tr>
     <tr Height='10px' >
            <td width='50%' colspan='3'  ></td>
			<td width='25%' class='tabla_th1' >Total filas:</td>
			<td width='25%' class='tabla_th1' ><s:property value="total_registros" /></td>
     </tr>
      <tr Height='10px' >
            <td width='50%' colspan='3'  ></td>
			<td width='25%' class='tabla_th1' >Total asignados:</td>
			<td width='25%' class='tabla_th1' ><s:property value="total_2" /></td>
     </tr>
      <tr Height='10px' >
            <td width='50%' colspan='3'  ></td>
			<td width='25%' class='tabla_th1' >Registrados x vendedor:</td>
			<td width='25%' class='tabla_th1' ><s:property value="total_3" /></td>
     </tr>
     <tr Height='10px' >
            <td width='50%' colspan='3'  ></td>
			<td width='25%' class='tabla_th1' >Total en pausa:</td>
			<td width='25%' class='tabla_th1' ><s:property value="total_4" /></td>
     </tr>
     <tr Height='10px' >
            <td width='50%' colspan='3'  ></td>
			<td width='25%' class='tabla_th1' >Total rechazados:</td>
			<td width='25%' class='tabla_th1' ><s:property value="total_5" /></td>
     </tr>
     <tr Height='10px' >
            <td width='50%' colspan='3'  ></td>
			<td width='25%' class='tabla_th1' >Total presupuesto (ESTATUS EN PROCESO):</td>
			<td width='25%' class='tabla_th1' ><s:property value="total_1" /></td>
     </tr>
 </table>
</div>
<script type="text/javascript">
    tooltip();
</script>
</body>
</html>
